resolve 'if' error within CMakeLists.txt
Appearently CMake cannot deal with if/endif within the add_library call. Thus the call is now completly enclosed from the if/endif statements
This commit is contained in:
parent
ca5ae23410
commit
d6d9976285
@ -146,13 +146,12 @@ aux_source_directory(${NANA_SOURCE_DIR}/threads NANA_THREADS_SOURCE)
|
|||||||
#To show .h files in Visual Studio, add them to the list of sources in add_executable / add_library
|
#To show .h files in Visual Studio, add them to the list of sources in add_executable / add_library
|
||||||
#and Use SOURCE_GROUP if all your sources are in the same directory
|
#and Use SOURCE_GROUP if all your sources are in the same directory
|
||||||
|
|
||||||
|
if(NOT APPLE)
|
||||||
add_library(${PROJECT_NAME} ${NANA_SOURCE}
|
add_library(${PROJECT_NAME} ${NANA_SOURCE}
|
||||||
${NANA_DETAIL_SOURCE}
|
${NANA_DETAIL_SOURCE}
|
||||||
${NANA_FILESYSTEM_SOURCE}
|
${NANA_FILESYSTEM_SOURCE}
|
||||||
if(NOT APPLE)
|
|
||||||
${NANA_AUDIO_SOURCE}
|
${NANA_AUDIO_SOURCE}
|
||||||
${NANA_AUDIO_DETAIL_SOURCE}
|
${NANA_AUDIO_DETAIL_SOURCE}
|
||||||
endif (NOT APPLE)
|
|
||||||
${NANA_GUI_SOURCE}
|
${NANA_GUI_SOURCE}
|
||||||
${NANA_GUI_DETAIL_SOURCE}
|
${NANA_GUI_DETAIL_SOURCE}
|
||||||
${NANA_GUI_WIDGETS_SOURCE}
|
${NANA_GUI_WIDGETS_SOURCE}
|
||||||
@ -161,8 +160,23 @@ endif (NOT APPLE)
|
|||||||
${NANA_PAINT_DETAIL_SOURCE}
|
${NANA_PAINT_DETAIL_SOURCE}
|
||||||
${NANA_SYSTEM_SOURCE}
|
${NANA_SYSTEM_SOURCE}
|
||||||
${NANA_THREADS_SOURCE})
|
${NANA_THREADS_SOURCE})
|
||||||
|
endif (NOT APPLE)
|
||||||
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
add_library(${PROJECT_NAME} ${NANA_SOURCE}
|
||||||
|
${NANA_DETAIL_SOURCE}
|
||||||
|
${NANA_FILESYSTEM_SOURCE}
|
||||||
|
${NANA_AUDIO_SOURCE}
|
||||||
|
${NANA_AUDIO_DETAIL_SOURCE}
|
||||||
|
${NANA_GUI_SOURCE}
|
||||||
|
${NANA_GUI_DETAIL_SOURCE}
|
||||||
|
${NANA_GUI_WIDGETS_SOURCE}
|
||||||
|
${NANA_GUI_WIDGETS_SKELETONS_SOURCE}
|
||||||
|
${NANA_PAINT_SOURCE}
|
||||||
|
${NANA_PAINT_DETAIL_SOURCE}
|
||||||
|
${NANA_SYSTEM_SOURCE}
|
||||||
|
${NANA_THREADS_SOURCE})
|
||||||
#Headers: use INCLUDE_DIRECTORIES
|
#Headers: use INCLUDE_DIRECTORIES
|
||||||
# Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES
|
# Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES
|
||||||
target_link_libraries(${PROJECT_NAME} -L/opt/X11/lib/ -lX11 -lXft -lpng -liconv)
|
target_link_libraries(${PROJECT_NAME} -L/opt/X11/lib/ -lX11 -lXft -lpng -liconv)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user