From e604d71fbc1f43a4fa7318d1286a666a5696a659 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 3 Nov 2018 23:46:34 -0600 Subject: [PATCH] CMake: Don't build p3dconfig anymore dconfig.cxx was recently deleted. p3dconfig is now just an interface library, since it still contains a header which we'd like on the search path of libraries that use it. --- dtool/metalibs/dtoolconfig/CMakeLists.txt | 2 +- dtool/src/dconfig/CMakeLists.txt | 19 ++++--------------- dtool/src/interrogatedb/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/dtool/metalibs/dtoolconfig/CMakeLists.txt b/dtool/metalibs/dtoolconfig/CMakeLists.txt index 977c3e0ede..1b0564c3b3 100644 --- a/dtool/metalibs/dtoolconfig/CMakeLists.txt +++ b/dtool/metalibs/dtoolconfig/CMakeLists.txt @@ -1,3 +1,3 @@ -set(DTOOLCONFIG_LINK_TARGETS p3prc p3dconfig p3interrogatedb) +set(DTOOLCONFIG_LINK_TARGETS p3prc p3interrogatedb) add_metalib(p3dtoolconfig INIT init_libdtoolconfig dtoolconfig.h COMPONENTS ${DTOOLCONFIG_LINK_TARGETS}) install(TARGETS p3dtoolconfig DESTINATION lib RUNTIME DESTINATION bin) diff --git a/dtool/src/dconfig/CMakeLists.txt b/dtool/src/dconfig/CMakeLists.txt index 5292450558..9dff9c0baa 100644 --- a/dtool/src/dconfig/CMakeLists.txt +++ b/dtool/src/dconfig/CMakeLists.txt @@ -1,16 +1,5 @@ -set(P3DCONFIG_HEADERS - config_dconfig.h dconfig.I dconfig.h) +# Yes, INTERFACE: don't build it, there's no code! +# We're only doing this to put the .h file on the path. +add_library(p3dconfig INTERFACE) -set(P3DCONFIG_SOURCES - config_dconfig.cxx dconfig.cxx) - -composite_sources(p3dconfig P3DCONFIG_SOURCES) - -add_component_library(p3dconfig NOINIT SYMBOL BUILDING_DTOOL_DCONFIG - ${P3DCONFIG_HEADERS} ${P3DCONFIG_SOURCES}) -target_link_libraries(p3dconfig p3prc) - -if(NOT BUILD_METALIBS) - install(TARGETS p3dconfig DESTINATION lib RUNTIME DESTINATION bin) -endif() -install(FILES ${P3DCONFIG_HEADERS} DESTINATION include/panda3d) +install(FILES dconfig.h DESTINATION include/panda3d) diff --git a/dtool/src/interrogatedb/CMakeLists.txt b/dtool/src/interrogatedb/CMakeLists.txt index 3088a31e78..65e4fdf669 100644 --- a/dtool/src/interrogatedb/CMakeLists.txt +++ b/dtool/src/interrogatedb/CMakeLists.txt @@ -39,7 +39,7 @@ composite_sources(p3interrogatedb P3INTERROGATEDB_SOURCES) add_component_library(p3interrogatedb NOINIT SYMBOL BUILDING_INTERROGATEDB ${P3INTERROGATEDB_HEADERS} ${P3INTERROGATEDB_SOURCES}) -target_link_libraries(p3interrogatedb p3dconfig) +target_link_libraries(p3interrogatedb p3prc p3dconfig p3dtool) if(NOT BUILD_METALIBS) install(TARGETS p3interrogatedb DESTINATION lib RUNTIME DESTINATION bin)