diff --git a/3rdparty/fonts/CMakeLists.txt b/3rdparty/fonts/CMakeLists.txt index 04982db1b..04712bd19 100644 --- a/3rdparty/fonts/CMakeLists.txt +++ b/3rdparty/fonts/CMakeLists.txt @@ -7,8 +7,11 @@ set (FNT_SOURCES add_library(PLIBFont STATIC ${FNT_SOURCES}) -target_link_libraries(PLIBFont SimGearCore) +target_link_libraries(PLIBFont SimGearCore ) -target_include_directories(PLIBFont PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +# we use in fnt.h, so we need to use it +target_include_directories(PLIBFont PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${OPENSCENEGRAPH_INCLUDE_DIRS}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90f9d326c..f0f3c1270 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,8 +463,8 @@ configure_file ( # Setup build.h header, each build include( GenerateBuildInfo ) -# global includes: these are used by every singl target, so we do set them globally -# even though that's not stricly best practice +# global includes: these are used by every single target, so we do set them globally +# even though that's not strictly best practice include_directories(${PROJECT_BINARY_DIR}/src/Include) include_directories(${PROJECT_BINARY_DIR}/src) # for version.h include_directories(${PROJECT_SOURCE_DIR}/src) @@ -482,15 +482,7 @@ add_subdirectory(scripts) ### MSVC startup project - ensure you can just hit build & run in MSVC set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT fgfs) -#----------------------------------------------------------------------------- -### uninstall target -#----------------------------------------------------------------------------- -CONFIGURE_FILE( - "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) -ADD_CUSTOM_TARGET(uninstall - "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") +include(Installation) # The test suite. enable_testing() diff --git a/CMakeModules/Installation.cmake b/CMakeModules/Installation.cmake index 3b0539a13..8c09d7b9e 100644 --- a/CMakeModules/Installation.cmake +++ b/CMakeModules/Installation.cmake @@ -14,3 +14,14 @@ if (TARGET sentry_crashpad::handler) install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL) endif() endif() + +#----------------------------------------------------------------------------- +### uninstall target +#----------------------------------------------------------------------------- +CONFIGURE_FILE( + "${PROJECT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in" + "${PROJECT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) +ADD_CUSTOM_TARGET(uninstall + "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_uninstall.cmake") + diff --git a/test_suite/CMakeLists.txt b/test_suite/CMakeLists.txt index 7c33e2c6e..1c47b163d 100644 --- a/test_suite/CMakeLists.txt +++ b/test_suite/CMakeLists.txt @@ -142,6 +142,9 @@ setup_fgfs_libraries(fgfs_test_suite) # Additional search paths for includes. setup_fgfs_includes(fgfs_test_suite) +# test codce includes its headers as test_suite/foo.h, so we need this +target_include_directories(fgfs_test_suite PUBLIC ${PROJECT_SOURCE_DIR}) + target_compile_definitions(fgfs_test_suite PUBLIC BUILDING_TESTSUITE) # Additional libraries just for the test suite.