Skip to main content

About pthread: in the simplest project : cmake good:

 (20200923: work)
Determining if the pthread_create exist failed with the following output:
...
CheckSymbolExists.c:(.text+0x4): undefined reference to `pthread_create'
...

Check if HAVE_PTHREAD_CREATE exists or not.

------ check starts. ---------
grep -R . | grep HAVE_PTHREAD_CREATE
001-HAVE-002.txt:001-HAVE-001.txt:build/CMakeCache.txt:CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1
001-HAVE-002.txt:build/CMakeCache.txt:CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1
001-HAVE-001.txt:build/CMakeCache.txt:CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1
build/CMakeCache.txt:CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1
------ check ends. ---------

We can understand CMAKE_BINARY_DIR is already set assumed, which is automation-parameters.

CMakeLists.txt:set(wxBINARY_DIR ${CMAKE_BINARY_DIR})

1. Create in "main.h" #define PTHREAD  1

2. Write the below in CMakeLists.txt
set(wxSOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(wxBINARY_DIR ${CMAKE_BINARY_DIR})
set(wxOUTPUT_DIR ${wxBINARY_DIR}/lib)

3. Compilation as "cmake .." inside build folder.


4. Other things:
Ensured inclusion of tiff_directory: their work, we respect.

(20200923: wxWidgets)
---
$ grep -R . |grep wxSOURCE_DIR | grep zlib
build/cmake/lib/zlib.cmake:    set(ZLIB_INCLUDE_DIRS ${wxSOURCE_DIR}/src/zlib)
---
$ grep -R . |grep wxSOURCE_DIR | grep tiff
build/cmake/lib/tiff.cmake:        ${wxSOURCE_DIR}/src/tiff/libtiff
build/cmake/lib/tiff.cmake:    set(TIFF_INCLUDE_DIRS ${wxSOURCE_DIR}/src/tiff/libtiff)
---
$ grep -R . |grep wxSOURCE_DIR | grep TIFF_INCLUDE_DIRS
build/cmake/lib/tiff.cmake:    set(TIFF_INCLUDE_DIRS ${wxSOURCE_DIR}/src/tiff/libtiff)
---

---

Always, they helps us.

---

Beautiful their work especially window customized: How to CMake Good - 2e - Source/Binary Directories and add_subdirectory() 

---

Comments

Popular posts from this blog

ffmpeg: compilation: Makefile

1. Find sub-directory and ... 2. Care of the literature and ... * Parameter print - - - - CONFIG_POSTPROC - - - .PHONY ...  there is a file named  clean . ... - - - - - - - - - - - - .\Makefile File changed time Fri Jun 04 12:29:06 2021 1 :MAIN_MAKEFILE=1 2 :include config.mak 3 : 4 :vpath %.c $(SRC_PATH) 5 :vpath %.cpp $(SRC_PATH) 6 :vpath %.h $(SRC_PATH) 7 :vpath %.inc $(SRC_PATH) 8 :vpath %.m $(SRC_PATH) 9 :vpath %.S $(SRC_PATH) 10 :vpath %.asm $(SRC_PATH) 11 :vpath %.rc $(SRC_PATH) 12 :vpath %.v $(SRC_PATH) 13 :vpath %.texi $(SRC_PATH) 14 :vpath %/fate_config.sh.template $(SRC_PATH) 15 : 16 :AVPROGS-$(CONFIG_FFMPEG) += ffmpeg 17 :AVPROGS-$(CONFIG_FFPLAY) += ffplay 18 :AVPROGS-$(CONFIG_FFPROBE) += ffprobe 19 :AVPROGS-$(CONFIG_FFSERVER) += ffserver 20 : 21 :AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF)) 22 :INSTPROGS = $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF)) ...

Big Leaves:

They are growing this year.Dirt is well for any leaves.Weirds are cut by the machine on the line. 2022/10/09 10:24:08 *

cmake-gui

We could yum-search cmake-gui, install it and boot it so that easily create project files for compilation, which means almost make files as configured: cmake-gui can use VERSION 3.6.1 if you add entry: message is the below: CMake Error: The source directory "...../read_005/src" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. We must create CMakeLists.txt but we can select "from UNIX makefile" as "Configure". "cmake-gui" itself is CMake 2.8.12.2 displayed. We could see CmakeCache.txt like the below so that we could not create tags by use of cmak-gui. ######################## # EXTERNAL cache entries ######################## cmake_minimum_required:STRING=VERSION 3.6.1 We'd rather love: cmake_minimum_required(VERSION 3.6.1) cmake-gui version itself must be higher, at least, we think.  (20200911: cmake3-gui) Configured and Generator: Now they are same. --- CMake Error: The source dir...