wxWidgets: audacity: From All compilation

 From All compilation, we can stand on the excutable directory path.

wxWidget is one of  Linking libraries, so, we cam edit CMakeLists.txt in the audacity main directory.



Add library:

https://lefestyle101.blogspot.com/2020/09/about-pthread-in-simple-project.html

https://cmake.org/cmake/help/latest/guide/tutorial/index.html#adding-a-library-step-2


The below is the example the above link.


add_library(MathFunctions mysqrt.cxx)
# add the MathFunctions library
add_subdirectory(MathFunctions)

# add the executable
add_executable(Tutorial tutorial.cxx)

target_link_libraries(Tutorial PUBLIC MathFunctions)

# add the binary tree to the search path for include files
# so that we will find TutorialConfig.h
target_include_directories(Tutorial PUBLIC
                          "${PROJECT_BINARY_DIR}"
                          "${PROJECT_SOURCE_DIR}/MathFunctions"
                          )

Add:
1. sub directory, which is sure path.
2. execute, which is execute file.
3. link target, which is 1.
4. target include, which is as same name as 1 and has path under a source directory.

the answer is the below:
Tutorial is the executable project name, which becomes here audacity.

target_include_directories(Tutorial PUBLIC
                          "${PROJECT_BINARY_DIR}"
                          "${PROJECT_SOURCE_DIR}/wxWidgets/wxWidgets"
                          )
---
(20200926: )
in Main-sets, only print, we can see.
$ grep wxWidgets 001-backup-CMakeLists.txt
   print_properties( TARGET "wxWidgets" )
$
---
(20200926: )
target is only for osx, we assumed, so, we try in more simple case "print_properties( TARGET "wxWidgets" )".
$ grep TARGET 001-backup-CMakeLists.txt
   set( CMAKE_OSX_DEPLOYMENT_TARGET 10.7 CACHE INTERNAL "" )
   print_properties( TARGET "wxWidgets" )
---
 

コメント