Skip to content

Commit

Permalink
Separate out executable from library
Browse files Browse the repository at this point in the history
  • Loading branch information
rprospero committed Jun 18, 2024
1 parent c3f0e00 commit 9f9c948
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ target_include_directories(
target_link_libraries(
unnamed
PUBLIC ${WHOLE_ARCHIVE_FLAG}
PRIVATE # External libs
Qt6::Widgets Qt6::Core Qt6::3DCore Qt6::3DRender Qt6::3DExtras
Qt6::Quick)
# External libs
Qt6::Widgets
Qt6::Core
Qt6::3DCore
Qt6::3DRender
Qt6::3DExtras
Qt6::Quick)

set_target_properties(unnamed PROPERTIES PUBLIC_HEADER lineGeometry.h)

Expand All @@ -42,8 +46,11 @@ install(TARGETS unnamed)
# Main target
add_executable(demo main.cpp ${demo_MOC_SRCS})

target_include_directories(demo PRIVATE ${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src)
target_include_directories(
demo
PRIVATE ${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src
${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib
${Qt6Widgets_INCLUDE_DIRS} ${Qt6Quick3D_INCLUDE_DIRS})

target_link_libraries(demo PRIVATE unnamed Qt6::Widgets Qt6::Gui Qt6::Qml
Qt6::Core Qt6::Quick3D)
Expand Down

0 comments on commit 9f9c948

Please sign in to comment.