diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b359964a..968c429fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,9 +329,6 @@ include_directories(${SIMPLEINI_DIR}) # Third parties add_subdirectory(third_party) -# LAF libraries + Aseprite are compiled with config.h -include_directories(src) -add_definitions(-DHAVE_CONFIG_H) if(ENABLE_MEMLEAK) add_definitions(-DLAF_MEMLEAK) endif() @@ -340,6 +337,11 @@ set(LAF_WITH_TESTS ${ENABLE_TESTS} CACHE BOOL "Enable LAF tests") set(UNDO_TESTS ${ENABLE_TESTS} CACHE BOOL "Enable undo tests") add_subdirectory(laf) + +# LAF libraries + Aseprite are compiled with config.h +target_include_directories(laf-base PUBLIC src) +target_compile_definitions(laf-base PUBLIC HAVE_CONFIG_H) + add_subdirectory(src) ###################################################################### diff --git a/src/ver/CMakeLists.txt b/src/ver/CMakeLists.txt index 238b3cfd4..bb5b32c65 100644 --- a/src/ver/CMakeLists.txt +++ b/src/ver/CMakeLists.txt @@ -15,4 +15,4 @@ endif() add_library(ver-lib info.c ${gen_ver_fn}) add_dependencies(ver-lib generated_version_h) -target_include_directories(ver-lib PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") +target_include_directories(ver-lib PRIVATE .. "${CMAKE_CURRENT_BINARY_DIR}")